package com.ny.service;

import com.ny.entity.User;
import com.ny.mapper.UserMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;

import java.util.List;
import java.util.concurrent.TimeUnit;

import com.ny.entity.User;

public interface UserService {
    public List<User> findAllUser();
    public  User login(String username,String password);
    public int register(User user);
    public User findUserByEmail(String email);
    public void sendEmailCode(String email);
    int updatePasswordByEmail( String email,  String password);
    boolean checkCode(String email, String code);

    // 定义用户查询接口（根据用户名和密码）
    public User findUser(String username, String password);
}
